<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../jquery-3.4.1.js"></script>
</head>
<style>
    body{
      height: 1000px;
    }
    .ad{
      width: 357px;
      height: 181px;
      background: url("img/ad.png");
      position: fixed;
      bottom: 0;
      right: 0;
      display: none;
    }

    .close
    {
      width: 15px;
      height: 15px;
      display: inline-block;
      /*background: indianred;*/
      float: right;
      right: 5px;
      top: 5px;
      position: relative;
    }
  </style>
<body>
    <div class="ad"><span class="close"></span></div>
</body>
<script>
    $(()=>{
        //广告延迟几秒钟会弹出，设置delay()特效
        //点击"X"关闭广告
        $(".ad").delay(2000).slideDown();
        // $(".ad").slideDown().fadeOut().fadeIn().delay(5000).slideUp();
        $(".close").click(function(){
            $(".ad").slideUp();
        })
    })
</script>
</html>